<template>
    <view class="about-content">
        <rich-text :nodes="nodes"></rich-text>
    </view>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { commonApi } from '@/api/common';
import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'

onShareAppMessage(() => {
    return {
        title: '万选回收',
        path: '/pages/subPages/about'
    }
})

onShareTimeline(() => {
    return {
        title: '万选回收',
    }
})

const nodes = ref()
const getAbout = async () => {
    try {
        const res = await commonApi.config({
            type: 'about_us'
        });
        nodes.value = res.data?.value;
        uni.setNavigationBarTitle({
            title: res.data?.title
        })
    } catch (error) {
        console.log(error);
    }
}


onMounted(() => {
    getAbout();
})
</script>

<style scoped lang="scss">
@import '@/index.scss';

.about-content {
    padding: 32rpx;
}

.about-title {
    font-size: 36rpx;
    font-weight: bold;
    text-align: center;
    margin-top: 60rpx;
}

.about-content {
    font-size: 24rpx;
    color: #333333;
    text-align: center;
    margin-top: 20rpx;
    padding: 0 32rpx;
}
</style>
<style>
page {
    background-color: #fff;
}
</style>